home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload Trio 2 / Shareware Overload Trio Volume 2 (Chestnut CD-ROM).ISO / dir38 / condor30.zip / HOW_TO.TXT < prev    next >
Text File  |  1993-06-14  |  5KB  |  121 lines

  1. HOW_TO.TXT  6-14-93
  2.  
  3. Read the whole file concepts apply for all languages.
  4.  
  5. Why use CONDOR at all?
  6.  
  7. CONDOR may have some drawbacks but it provides high-res graphics from within
  8. TEXT files and sound too!  CONDOR provides a COMMON GRAPHICS LANGUAGE for
  9. applications to communicate  to users with,  this is sorely needed in the
  10. online world as it is struggling with many custom terms to access this or that
  11. BBS system.  CONDOR can also be used on BBS system so a SYSOP can SEE the
  12. graphics locally BUT it's not required that a BBS be using CONDOR locally to
  13. have Condor graphics in message bases and or as menus.  Think of CONDOR as a
  14. SUPER-POWERFUL ANSI-SYS.   You can even have Condor graphics from within
  15. batch files!
  16.  
  17.  
  18. This file is about making a application use CONDOR and problems you might have.
  19. To do CONDOR graphics all you have to do is output your text to the screen using
  20. the DOS con: device.  This is slower than putting characters directly into
  21. screen memory so you may want to offer it as a option only.  The next thing
  22. is that if you have a user interface designed for a TEXT mode only or
  23. a GUI that is written to only work in one resolution you must realize that
  24. that CONDOR can change the resolutions and that means that you should
  25. check the screen mode (resolution, use the BIOS to check it)
  26. when the user of your application calls a menu.
  27. It's also a good idea for a terminal to drop any information lines at the
  28. bottom or top of the screen while running with CONDOR, if you don't most
  29. likely there will be problems.   I cannot be sure that CONDOR will work from
  30. WINDOWS 3.1  I know it will lock WINDOWS up on my system if you do graphics
  31. with CONDOR.  I don't know why anyone would want to use CONDOR from WINDOWS
  32. since it degrades CONDOR's performance by many factors.  CONDOR uses the BIOS
  33. routines so this slows things down but hopefully will make it more compatible
  34. across the clone world.
  35.  
  36. ********************** T U R B O - C **********************************
  37.  
  38. I wrote CONDOR with Borland C v2.0 and if you use Borland C or Turbo C
  39. all you need is:
  40.  
  41. unsigned char x;
  42. bdos(2,x,0);
  43.  
  44. That will send the text to the DOS CON: and CONDOR will recognize the command
  45. sequences if you output to the screen this way.
  46.  
  47. You need to remember to do some checking when you pull up your user menus:
  48. /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
  49. /*                                                              */
  50. /*  FUNCTION:   G e t _ m o d e                                 */
  51. /*                                                              */
  52. /*  REMARKS :   Get_mode gets the current video mode of the     */
  53. /*              adapter.                                        */
  54. /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
  55.  
  56. Get_mode (void)
  57. {
  58.     unsigned char mode;
  59.  
  60.     _AH = 0x0F;             /* INT 10 Function                  */
  61.     geninterrupt (0x10);    /* Invoke Video BIOS                */
  62.     mode = _AL;             /* Current Video State (Mode)       */
  63.     return mode;            /* Return The Current Mode          */
  64. }
  65.  
  66.  
  67.  
  68.  
  69. *******************  G F A  B A S I C  P C  ***************************
  70.  
  71. In GFA BASIC it's not enough to simply OPEN a IO channel to CON: and
  72. PRINT # to it.  They BYPASS the CON: even when you specify it!
  73. I used GFA BASIC PC to write the Condor PAINT application, I like it.
  74. Tip: If you are programming a application with GFA BASIC PC don't
  75. let CONDOR do a 'R' command because it flips out GFA BASIC, you
  76. have to set the res with the GFA Basic  SCREEN command.  This means
  77. you must parse the string you send to CONDOR before hand for the 'R'
  78. command.  Condor will detect what SCREEN mode you set with GFA BASIC
  79. and adjust to it, so you create a 'R' command for the CONDOR file you
  80. are building but never execute the 'R' command from within GFA BASIC.
  81. If you are not using GFA BASIC's GUI stuff then it doesn't matter.
  82.  
  83. The only way I found to get to the CON: device using GFA BASIC PC
  84. was to use INT 21 like this:
  85.  
  86. dor$=CHR$(27)+"{R13:b0:b0:b1:H0:C1,1:C2,2:O150,99,40:t90:R3:"
  87. dor$=dor$+CHR$(27)+"}"+CHR$(27)+"#A"
  88. con(dor$)
  89.  
  90. // *******  OUTPUT dor$ to "DOS" CON: device
  91. PROCEDURE con(dor$)
  92.   LOCAL i&
  93.  
  94.   FOR i&=1 TO LEN(dor$)
  95.     _DL=ASC(MID$(dor$,i&,1))
  96.     ~INTR($21,_AH=2)
  97.   NEXT i&
  98.  
  99. RETURN
  100.  
  101.  
  102.  
  103.  
  104. ******************* Q B A S I C ***************************************
  105.  
  106. It's very easy with QBASIC just OPEN a channel up to the "CON" and PRINT #
  107. to it and you are passing text through CONDOR.  A text file or whatever
  108. you want CONDOR will respond to the command sequences.  You can send
  109. one character at a time too, you don't have to send the whole string in one
  110. swoop.
  111.  
  112.  
  113. ' OUTPUT to CON:DOR using QBASIC that came with DOS 5.0
  114. OPEN "CON" FOR OUTPUT AS 1
  115. PRINT #1, CHR$(27); "{R13:b0:b0:b1:H0:C1,1:C2,2:O150,99,40:t90:R3:";
  116. PRINT #1, CHR$(27); "}"; CHR$(27); "#A";
  117. CLOSE #1
  118.  
  119.  
  120.  
  121.